<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>

        function f(){
            // var value=localStorage.getItem("abc");
            var value=sessionStorage.getItem("abc");
            alert(value);
        }

    </script>

</head>
<body>

    <a href="javascript:;" onclick="f();">test</a>

</body>
</html>